#include<iostream>
#include<algorithm>
using namespace std;

const int SIZE = 100;
int main(int argc, char const *argv[])
{
    freopen("test.txt","r",stdin);
    int a,b; cin>>a>>b;
    char s[SIZE]={0}; sprintf(s,"%d",a+b);
    int sl = 0;for(;s[sl];++sl);
    char st[SIZE]={0}; int top = 0;
    int nums = 0;
    for(int i = sl-1;i>=0;--i)
    {
        st[top++] = s[i];
        if(s[i]!='-') nums++;
        if( nums%3==0 ) st[top++] = ',';
    }
    int cnt = 0;
    while(top)
    {
        if( !(st[top-1]==',' && !cnt) )
        {
            printf("%c",st[top-1]);
            if(st[top-1] != '-' && st[top-1]!=',')
                cnt++;
        }
        top--;
    }
    return 0;
}
